﻿using Domain.Entity;
using Domain.Entity.bs;
using Domain.Entity.sys;
using Domain.Entity.zct;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Domain.IRepository
{
    public interface ISupplierRepository
    {
        //高级查询
        Task<FenYe<Supplier>> GetSeniorSupplier(FenYe<Supplier> fenYe, string? sup_code, string? sup_name, string? sup_industry, string? sup_type, string? sup_linkman, string? sup_linkphone, string? sup_email, string? sup_depName, string? sup_userName, int? sup_status, string? sup_address, string? sup_accountName, string? sup_taxpayerNum, string? sup_bankAccount, string? sup_openBank, string? create_name, string? startTime, string? endTime);

        //查询
        Task<FenYe<Supplier>> GetSupplier(FenYe<Supplier> fenYe, string? sup_code, string? sup_name, int? sup_status, string? sup_industry, string? sup_userName);

        // 添加供应商
        Task<int> AddSupplier(Supplier supplier);

        // 删除供应商
        Task<int> DeleteSupplier(int id);

        // 修改供应商
        Task<int> UpdateSupplier(Supplier supplier);

        //修改状态
        Task<int> UpdateStatus(int id, int sup_status);

        /// <summary>
        /// 查询部门
        /// </summary>
        /// <returns>
        /// 默认查询全部状态为启用删除标识为0的数据，如果有Department_id参数存在就查询使用Department_id字段数据和Department_id参数相等的数据
        /// </returns>
        Task<List<Department>> GetDepartment(int? Department_id);

        /// <summary>
        /// 查询用户
        /// </summary>
        /// <returns>
        /// 默认查询全部状态为启用删除标识为0的数据，如果有Department_id参数存在就查询使用Department_id字段数据和Department_id参数相等的数据
        /// </returns>
        Task<List<User>> GetUser(int? Department_id);

        /// <summary>
        /// 查询字典
        /// </summary>
        /// <returns>
        /// 查询状态为启用，且类型编号正确的数据字典
        /// </returns>
        Task<List<DictData>> GetDictData(int dict_id);

        /// <summary>
        /// 使用Id查询供应商
        /// </summary>
        Task<Supplier> GetIdSupplier(int id);


        /// <summary>
        /// 查询所有供应商编号
        /// </summary>
        Task<List<string>> GetSupplierID();

        //查询所有供应商
        Task<List<Supplier>> GetAllSupplier();
    }
}
